package com.xuanfu_button;

import android.content.Context;
import android.util.AttributeSet;
import android.view.View;
import android.widget.Button;
import android.widget.LinearLayout;

import net.xxhong.rosclient.R;

/**
 * @author Thunder
 *
 */
public class XuanfuButton_blank extends LinearLayout {

	public XuanfuButton_blank(Context context) {
		super(context);
		initView(context);
	}
	public XuanfuButton_blank(Context context, AttributeSet attrs) {
		super(context, attrs);
		initView(context);
	}
	public Button button1;
    private Button button2;
	double linearLayout_xuanfuWidth=0;
	double linearLayout_xuanfuHeight=0;
	private void initView(Context context) {
		// TODO Auto-generated method stub
		View.inflate(context, R.layout.xuanfu_button, this);
		int height = MeasureSpec.makeMeasureSpec(0, MeasureSpec.UNSPECIFIED);
		int width = MeasureSpec.makeMeasureSpec(0, MeasureSpec.UNSPECIFIED);
		LinearLayout  linearLayout_xuanfu=(LinearLayout) findViewById(R.id.xuanfu_view);
		linearLayout_xuanfu.measure(width, height);
		this.measure(width, height);
		linearLayout_xuanfuWidth=linearLayout_xuanfu.getMeasuredWidth();
		linearLayout_xuanfuHeight=linearLayout_xuanfu.getMeasuredHeight();
		button1 = (Button) findViewById(R.id.button1);
		button2 = (Button) findViewById(R.id.button2);
	}
	public void setButton1Text(String t){
		button1.setText(t);
	}
	public void setButton2Text(String t){
		button2.setText(t);
	}
	public int getlinearLayout_xuanfuWidth(){
		return (int)linearLayout_xuanfuWidth;
	}
	public int getlinearLayout_xuanfuHeight(){
		return (int)linearLayout_xuanfuHeight;
	}
	public View  button1(){
		return button1;
	}
	public View  button2(){
		return button2;
	}
}
